package com.xiangying.entity;

import java.io.Serializable;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

import org.hibernate.validator.constraints.NotBlank;

public class User implements Serializable {
	
	private static final long serialVersionUID = 7815544761433232363L;
	
	private Long id;
	
	@NotBlank(message = "用户名称不能为空")
	private String name;
	
	@Min(value = 10, message = "年龄不能小于10岁")
	@Max(value = 100, message = "年龄不能大于100岁")
	private Integer age;
	
	@NotBlank(message = "密码不能为空")
	private String password;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
